import util from "@/utils/request";
let $axios = util
//查询列表
const queryCanList = (params) => {
    return $axios({
        url: '/api/getPageScheduleList',
        method: 'get',
        params
        
    })
}
//新增档期
const submitCanInfo = (data) => {
    return $axios({
        url: '/api/addSchedule',
        method: 'post',
        data
    })
}
//合作公司-不分页
const queryCanCompanyList = (params) => {
    return $axios({
        url: '/api/getPartnerCompanyList',
        method: 'get',
        params

    })
}
//合作厅不分页查询
const queryCanHallList = (params) => {
    return $axios({
        url: '/api/getCeremonyHallList',
        method: 'get',
        params
    })
}
//人员信息-定档人员不分页
const queryCanUserList = (params) => {
    return $axios({
        url: '/api/getUserInfoList',
        method: 'get',
        params
    })
}
//删除数据
const deleteCanItem = (params) => {
    return $axios({
        url: `/api/deleteSchedule/${params}`,
        method: 'delete',
    })
}
//更新数据
const updataCanInfo = (data) => {
    return $axios({
        url: '/api/updateSchedule',
        method: 'put',
        data
    })
}//数据详情
const getCanItemInfo = (params) => {
    return $axios({
        url: `/api/queryScheduleDetail/${params}`,
        method: 'get',
    })
}
//结账
const queryCanCheckout = (data) => {
    return $axios({
        url: '/api/checkoutSchedule',
        method: 'post',
        data
    })
}
//批量删除
const batchDeleteCanItem = (data) => {
    return $axios({
        url: '/api/batchDeleteSchedule',
        method: 'delete',
        data
    })
}

export default {
    queryCanList,
    submitCanInfo,
    queryCanCompanyList,
    queryCanHallList,
    queryCanUserList,
    deleteCanItem,
    updataCanInfo,
    getCanItemInfo,
    queryCanCheckout,
    batchDeleteCanItem
}